<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/hypercube.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">hypercube.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="hypercube_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#ifndef HELIB_HYPERCUBE_H</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#define HELIB_HYPERCUBE_H</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">class </span>PAlgebra; <span class="comment">// forward declaration</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html">   27</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  NTL::Vec&lt;long&gt; dims;  <span class="comment">// dims[i] is the size along the i&#39;th dimension</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  NTL::Vec&lt;long&gt; prods; <span class="comment">// prods[i] = \prod_{j=i}^{n-1} dims[i]</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a35bb466664c8bda4f00b46ce2a88135e">   34</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html#a35bb466664c8bda4f00b46ce2a88135e">CubeSignature</a>() {} <span class="comment">// a nullptr signature</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">   36</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">initSignature</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> _dims[], <span class="keywordtype">long</span> _ndims)</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="comment">// can only initialize a nullptr signature</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <a class="code" href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">assertEq</a>(dims.length(),</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;             0l,</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;             <span class="stringliteral">&quot;Can only initialize an un-initialized signature&quot;</span>);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    assertTrue&lt;InvalidArgument&gt;(_ndims &gt;= 0l, <span class="stringliteral">&quot;Dimension count is negative&quot;</span>);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    dims.SetLength(_ndims);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    prods.SetLength(_ndims + 1);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    prods[_ndims] = 1;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = _ndims - 1; i &gt;= 0; i--) {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;      assertTrue&lt;InvalidArgument&gt;(</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;          _dims[i] &gt; 0,</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;          <span class="stringliteral">&quot;Bad (non-positive) cube signature dimension&quot;</span>);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;      dims[i] = _dims[i];</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      prods[i] = prods[i + 1] * _dims[i];</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="comment">// VecType is either std::vector&lt;intType&gt; or NTL:Vec&lt;intType&gt;</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> VecType&gt;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#aa3a8903128d694618cfbd29efbf78712">   59</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_cube_signature.html#aa3a8903128d694618cfbd29efbf78712">initSignature</a>(<span class="keyword">const</span> VecType&amp; _dims)</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">initSignature</a>(_dims.data(), <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(_dims));</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#afa627edae51d699afbd7ea557e735887">   64</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html#afa627edae51d699afbd7ea557e735887">CubeSignature</a>(<span class="keyword">const</span> <span class="keywordtype">long</span> _dims[], <span class="keywordtype">long</span> _ndims)</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">initSignature</a>(_dims, _ndims);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  }</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a4be2eaae3cdf78778fe6455c36912880">   68</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html#a4be2eaae3cdf78778fe6455c36912880">CubeSignature</a>(<span class="keyword">const</span> NTL::Vec&lt;long&gt;&amp; _dims) { <a class="code" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">initSignature</a>(_dims); }</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a0fb57f65fb46394e528cf00b5230b0ff">   69</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html#a0fb57f65fb46394e528cf00b5230b0ff">CubeSignature</a>(<span class="keyword">const</span> std::vector&lt;long&gt;&amp; _dims) { <a class="code" href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">initSignature</a>(_dims); }</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="comment">/* TODO: We could #include &lt;initializer_list&gt; and then do e.g.,</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">   * CubeSignature s {1,2,3};</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">  CubeSignature(std::initializer_list&lt;long&gt; _dims)</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">  {</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">     dims.SetLength(_dims.size());</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment">     long i;</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">     std::initializer_list&lt;long&gt;::iterator it;</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">     for (i=0, it=_dims.begin(); it!=_dims.end(); ++i, ++it)</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">       dims[i] = *it;</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">     [...] // continue as above, initialize prods</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">  }</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">  */</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">   86</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dims.length(); }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">   89</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ((<a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>() &gt; 0) ? prods[0] : 1); }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">   92</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dims.at(d); }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">   95</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prods.at(d); }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a95fd54e2404c6bb86e0db54d0509530b">   98</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a95fd54e2404c6bb86e0db54d0509530b">getProd</a>(<span class="keywordtype">long</span> from, <span class="keywordtype">long</span> to)<span class="keyword"> const</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">return</span> prods.at(from) / prods.at(to);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">  104</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">getCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d)<span class="keyword"> const</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                  0l,</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                  <a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(),</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">return</span> (i % prods.at(d)) / prods.at(d + 1);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">  115</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">addCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d, <span class="keywordtype">long</span> offset)<span class="keyword"> const</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                  0l,</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                  <a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(),</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    offset = offset % dims.at(d);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">if</span> (offset &lt; 0)</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      offset += dims.at(d);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordtype">long</span> i_d = <a class="code" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">getCoord</a>(i, d);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordtype">long</span> i_d1 = (i_d + offset) % dims.at(d);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordtype">long</span> i1 = i + (i_d1 - i_d) * prods.at(d + 1);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordflow">return</span> i1;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> VecType&gt;</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a07dafff8898d869fdf4cda00aea5453a">  138</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_cube_signature.html#a07dafff8898d869fdf4cda00aea5453a">incrementCoords</a>(VecType&amp; v)<span class="keyword"> const</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>() - 1; i &gt;= 0; --i) {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      <span class="keywordflow">if</span> (i &gt;= <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v))</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="keywordflow">continue</span>; <span class="comment">// sanity check</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;      <span class="comment">// increment current index, set all the ones after it to zero</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;      <span class="keywordflow">if</span> (<span class="keywordtype">long</span>(v[i]) &lt; <a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(i) - 1) {</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        v[i]++;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">long</span> j = i + 1; j &lt; <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v); j++)</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;          v[j] = 0;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">// succeeded in incrementing the vector</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      <span class="comment">// if buffer[i] &gt;= getDim(i)-1, move to previous index i</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// cannot increment the vector anymore</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> VecType&gt;</div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#aac3aba8f9b2c33bff60c489c048ce0f0">  159</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_cube_signature.html#aac3aba8f9b2c33bff60c489c048ce0f0">getAllCoords</a>(VecType&amp; v, <span class="keywordtype">long</span> i)<span class="keyword"> const</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                  0l,</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                  <a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(),</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <a class="code" href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">resize</a>(v, <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>()); <span class="comment">// resize(*), lsize(*) defined in NumbTh.h</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> j = <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>() - 1; j &gt;= 0; --j) {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      v[j] = i % <a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(j);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      i = (i - v[j]) / <a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(j);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> VecType&gt;</div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a5141c50fbbb80c5101614f826d1405e3">  176</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a5141c50fbbb80c5101614f826d1405e3">assembleCoords</a>(VecType&amp; v)<span class="keyword"> const</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <a class="code" href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">assertEq</a>(<a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v),</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;             <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>(),</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;             <span class="stringliteral">&quot;Vector size is different to the number of dimensions&quot;</span>);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordtype">long</span> idx = 0;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = 0; i &lt; <a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>(); i++) {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;      idx += v[i] * prods[i + 1];</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    }</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> idx;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#ae3b3e6e4fdefec7e372ecbefca124b44">  190</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#ae3b3e6e4fdefec7e372ecbefca124b44">numSlices</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(0, d); }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#afdf761640cffa14fc956ec9832f2d2c8">  193</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#afdf761640cffa14fc956ec9832f2d2c8">sliceSize</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(d); }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_signature.html#a40d654d1f59cf7c85acc69dae9b22e5a">  196</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a40d654d1f59cf7c85acc69dae9b22e5a">numCols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(1); }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  std::pair&lt;long, long&gt; <a class="code" href="classhelib_1_1_cube_signature.html#a52ab718393d2c41b96b000948adc6e0b">breakIndexByDim</a>(<span class="keywordtype">long</span> idx, <span class="keywordtype">long</span> dim) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_cube_signature.html#a94042541a4cc00ed145b38c77a65ebac">assembleIndexByDim</a>(std::pair&lt;long, long&gt; idx, <span class="keywordtype">long</span> dim) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classhelib_1_1_cube_signature.html#a73fef36c3f0bda715b5e8cdf847227c3">operator&lt;&lt;</a>(std::ostream&amp; s, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; sig);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;};</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="namespacehelib.html#a55a30d40b8861180c13416755e880749">  208</a></span>&#160;<span class="keyword">inline</span> std::ostream&amp; <a class="code" href="namespacehelib.html#addc58993c7093dd07d98335bab200e82">operator&lt;&lt;</a>(std::ostream&amp; s, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; sig)</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;{</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <span class="keywordflow">return</span> s &lt;&lt; sig.dims;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;}</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html">  220</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube</a></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;{</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; sig;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  NTL::Vec&lt;T&gt; data;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube</a>(); <span class="comment">// disable default constructor</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="comment">// Default copy-constructor</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#ab2b8a0cd2c244bc4ba33257ce4bc9819">  230</a></span>&#160;  <a class="code" href="classhelib_1_1_hyper_cube.html#ab2b8a0cd2c244bc4ba33257ce4bc9819">HyperCube</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube</a>&amp; other) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a957384beeec6fa0c24942cfab5cea98f">  233</a></span>&#160;  <a class="code" href="classhelib_1_1_hyper_cube.html#a957384beeec6fa0c24942cfab5cea98f">HyperCube</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; _sig) : sig(_sig)</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  {</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    data.FixLength(sig.<a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>());</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  }</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <span class="comment">// use default copy constructor</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a4eaa2f56a430f7756a880ae022268673">  241</a></span>&#160;  <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube</a>&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#a4eaa2f56a430f7756a880ae022268673">operator=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; other)</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  {</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <a class="code" href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">assertEq</a>(&amp;this-&gt;sig,</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;             &amp;other.sig,</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;             <span class="stringliteral">&quot;Cannot assign HyperCubes with different signatures&quot;</span>);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    data = other.data;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  }</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a62e2bf02d77489e5c5752673413bd4fe">  251</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a62e2bf02d77489e5c5752673413bd4fe">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <a class="code" href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">assertEq</a>(&amp;this-&gt;sig,</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;             &amp;other.sig,</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;             <span class="stringliteral">&quot;Cannot compare HyperCubes with different signatures&quot;</span>);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">return</span> data == other.data;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;  }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a748f5a34fa6683e46f34602b35046814">  259</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a748f5a34fa6683e46f34602b35046814">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other); }</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a4a1d07c48de62dc384f9059c1dbd0625">  262</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#a4a1d07c48de62dc384f9059c1dbd0625">getSig</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig; }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#aec3fa326e745e6909d1e2c554bf63747">  267</a></span>&#160;  NTL::Vec&lt;T&gt;&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#aec3fa326e745e6909d1e2c554bf63747">getData</a>() { <span class="keywordflow">return</span> data; }</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a7384994fa402d0a503419df0f6671e41">  270</a></span>&#160;  <span class="keyword">const</span> NTL::Vec&lt;T&gt;&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#a7384994fa402d0a503419df0f6671e41">getData</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data; }</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a1e7a909ae48826dbf9e73d39e28311ef">  273</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a1e7a909ae48826dbf9e73d39e28311ef">getSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(); }</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a0f68841b322376a580348abfb7ab0274">  276</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a0f68841b322376a580348abfb7ab0274">getNumDims</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>(); }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a33363ac14187bd07bcc4d153d5487f76">  279</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a33363ac14187bd07bcc4d153d5487f76">getDim</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(d); }</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">  282</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">getProd</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(d); }</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a8cddf7a9e157577df80565d50c42f8b5">  285</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a8cddf7a9e157577df80565d50c42f8b5">getProd</a>(<span class="keywordtype">long</span> from, <span class="keywordtype">long</span> to)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(from, to); }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a71758a62d2df3a5176a9317045f0d4ff">  288</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a71758a62d2df3a5176a9317045f0d4ff">getCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">getCoord</a>(i, d); }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a992f756d67769032de90654c201cf1b7">  291</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a992f756d67769032de90654c201cf1b7">addCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d, <span class="keywordtype">long</span> offset)<span class="keyword"> const</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">return</span> sig.<a class="code" href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">addCoord</a>(i, d, offset);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  }</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a55bd39c9c1967976ddc46feb070c57bf">  297</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a55bd39c9c1967976ddc46feb070c57bf">numSlices</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">getProd</a>(0, d); }</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a72e0ba1f4d1afa67023e8d4297ff1aeb">  300</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#a72e0ba1f4d1afa67023e8d4297ff1aeb">sliceSize</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">getProd</a>(d); }</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#afe571f26858da4a0ee94908b20497e8b">  303</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_hyper_cube.html#afe571f26858da4a0ee94908b20497e8b">numCols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">getProd</a>(1); }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160; </div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a558c114ad092dd3f3ea56f554e1d0c0e">  306</a></span>&#160;  T&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#a558c114ad092dd3f3ea56f554e1d0c0e">at</a>(<span class="keywordtype">long</span> i) { <span class="keywordflow">return</span> data.at(i); }</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#ac56487a22f0f9024f5056f64f26f8d0a">  309</a></span>&#160;  T&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#ac56487a22f0f9024f5056f64f26f8d0a">operator[]</a>(<span class="keywordtype">long</span> i) { <span class="keywordflow">return</span> data[i]; }</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#a9cd93ed835c30921fad60ca7d9850302">  312</a></span>&#160;  <span class="keyword">const</span> T&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#a9cd93ed835c30921fad60ca7d9850302">at</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data.at(i); }</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="classhelib_1_1_hyper_cube.html#acd197efbc091aa3e83876666a7a6e2d1">  315</a></span>&#160;  <span class="keyword">const</span> T&amp; <a class="code" href="classhelib_1_1_hyper_cube.html#acd197efbc091aa3e83876666a7a6e2d1">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data[i]; }</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_hyper_cube.html#afb8bd0492411e47159fa502c2f1d61a8">rotate1D</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> k);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160; </div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_hyper_cube.html#aaaf76a8d1f6db9658e14eeecbbe97cdb">shift1D</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> k);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;};</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html">  337</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;{</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;  <span class="keyword">const</span> NTL::Vec&lt;T&gt;* data;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>* sig;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;  <span class="keywordtype">long</span> dimOffset;  <span class="comment">// # of &quot;missing dimensions&quot; is this slice vs. the full cube</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;  <span class="keywordtype">long</span> sizeOffset; <span class="comment">// index in the cube of the first element in this slice</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>(); <span class="comment">// disabled</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00349"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a5791e8467d77d542605a299052a05fc1">  349</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a5791e8467d77d542605a299052a05fc1">ConstCubeSlice</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; _cube)</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  {</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    data = &amp;_cube.<a class="code" href="classhelib_1_1_hyper_cube.html#aec3fa326e745e6909d1e2c554bf63747">getData</a>();</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    sig = &amp;_cube.<a class="code" href="classhelib_1_1_hyper_cube.html#a4a1d07c48de62dc384f9059c1dbd0625">getSig</a>();</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    dimOffset = 0;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    sizeOffset = 0;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  }</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160; </div>
<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a0095f233d39925cf7e6690f9b650bbd5">  357</a></span>&#160;  <a class="code" href="classhelib_1_1_const_cube_slice.html#a0095f233d39925cf7e6690f9b650bbd5">ConstCubeSlice</a>(<span class="keyword">const</span> NTL::Vec&lt;T&gt;&amp; _data, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; _sig)</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;  {</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    assertEq&lt;InvalidArgument&gt;(_data.length(),</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;                              _sig.<a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(),</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;                              <span class="stringliteral">&quot;Data and signature sizes are different&quot;</span>);</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    data = &amp;_data;</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    sig = &amp;_sig;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    dimOffset = 0;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    sizeOffset = 0;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;  }</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;  <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&amp; bigger, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> _dimOffset = 1);</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;  <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; _cube, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> _dimOffset = 1);</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;  <span class="comment">// use default copy constructor and assignment operators,</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;  <span class="comment">// which means shallow copy</span></div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;  <span class="comment">// the following mimic the corresponding methods</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  <span class="comment">// in the HyperCube class, restricted to the slice</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160; </div>
<div class="line"><a name="l00380"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a03b220d9a0d636d118479cdd05c539c2">  380</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; <a class="code" href="classhelib_1_1_const_cube_slice.html#a03b220d9a0d636d118479cdd05c539c2">getSig</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *sig; }</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160; </div>
<div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">  383</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">getSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(dimOffset); }</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#aa5b21d8bfc9b9ddb1fffbbc20ebde105">  386</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#aa5b21d8bfc9b9ddb1fffbbc20ebde105">getNumDims</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">getNumDims</a>() - dimOffset; }</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160; </div>
<div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a399e6fd73e187115388692cfd32fb504">  389</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a399e6fd73e187115388692cfd32fb504">getDim</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(d + dimOffset); }</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160; </div>
<div class="line"><a name="l00392"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">  392</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">getProd</a>(<span class="keywordtype">long</span> d)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(d + dimOffset); }</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160; </div>
<div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a2222c9ffaacb4f4eade3f6d5387dbcc1">  395</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a2222c9ffaacb4f4eade3f6d5387dbcc1">getProd</a>(<span class="keywordtype">long</span> from, <span class="keywordtype">long</span> to)<span class="keyword"> const</span></div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(from + dimOffset, to + dimOffset);</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;  }</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a381b1ff3cabe3ae637322911a7396c77">  401</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a381b1ff3cabe3ae637322911a7396c77">getCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d)<span class="keyword"> const</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;                  0l,</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;                  <a class="code" href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">getSize</a>(),</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">getCoord</a>(i + sizeOffset, d + dimOffset);</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;  }</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160; </div>
<div class="line"><a name="l00411"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a8fd0efeb0727de161843f9f1ea434a73">  411</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a8fd0efeb0727de161843f9f1ea434a73">addCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> d, <span class="keywordtype">long</span> offset)<span class="keyword"> const</span></div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;                  0l,</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;                  <a class="code" href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">getSize</a>(),</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordflow">return</span> sig-&gt;<a class="code" href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">addCoord</a>(i + sizeOffset, d + dimOffset, offset);</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;  }</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160; </div>
<div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a40a482b543e07df30aea4b46529416fd">  421</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a40a482b543e07df30aea4b46529416fd">numSlices</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">getProd</a>(0, d); }</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160; </div>
<div class="line"><a name="l00424"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a9e2a77ff125ca4e04aadb1ba0b8e947b">  424</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a9e2a77ff125ca4e04aadb1ba0b8e947b">sliceSize</a>(<span class="keywordtype">long</span> d = 1)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">getProd</a>(d); }</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160; </div>
<div class="line"><a name="l00427"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#afdf82fe6ccc0ad79784725212fd9b1c2">  427</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#afdf82fe6ccc0ad79784725212fd9b1c2">numCols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">getProd</a>(1); }</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160; </div>
<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a1372bbe035d95cdebc3a24ed85e18556">  430</a></span>&#160;  <span class="keyword">const</span> T&amp; <a class="code" href="classhelib_1_1_const_cube_slice.html#a1372bbe035d95cdebc3a24ed85e18556">at</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const</span></div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    <a class="code" href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">assertInRange</a>(i,</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;                  0l,</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;                  <a class="code" href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">getSize</a>(),</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;                  <span class="stringliteral">&quot;Coordinate does not exist (index i out of range)&quot;</span>);</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    <span class="keywordflow">return</span> (*data)[i + sizeOffset];</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;  }</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160; </div>
<div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="classhelib_1_1_const_cube_slice.html#a2df872d7d60ff1e7ec007f7dc02a9339">  440</a></span>&#160;  <span class="keyword">const</span> T&amp; <a class="code" href="classhelib_1_1_const_cube_slice.html#a2df872d7d60ff1e7ec007f7dc02a9339">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*data)[i + sizeOffset]; }</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;};</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160; </div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00446"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html">  446</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_cube_slice.html">CubeSlice</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&lt;T&gt;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;{</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;  <a class="code" href="classhelib_1_1_cube_slice.html">CubeSlice</a>(); <span class="comment">// disabled</span></div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;  <span class="comment">// initialize the slice to the full cube</span></div>
<div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#a88bff80a19d958a27a0ca551f3e73313">  452</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_cube_slice.html#a88bff80a19d958a27a0ca551f3e73313">CubeSlice</a>(<a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; _cube) : <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&lt;T&gt;(_cube) {}</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160; </div>
<div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#aa7303027f9a2e60756fa1bc1e65e485e">  454</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_slice.html#aa7303027f9a2e60756fa1bc1e65e485e">CubeSlice</a>(NTL::Vec&lt;T&gt;&amp; _data, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a>&amp; _sig) :</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;      <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&lt;T&gt;(_data, _sig)</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;  {}</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160; </div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;  <span class="comment">// initialize the slice to point to the i-th subcube</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;  <span class="comment">// of the cube pointed to by bigger</span></div>
<div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#a2d30bf545693bf69b1eb151cd968c915">  460</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_slice.html#a2d30bf545693bf69b1eb151cd968c915">CubeSlice</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_cube_slice.html">CubeSlice&lt;T&gt;</a>&amp; bigger, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> _dimOffset = 1) :</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;      <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&lt;T&gt;(bigger, i, _dimOffset)</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;  {}</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160; </div>
<div class="line"><a name="l00464"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#aa8f4111ea23e19590c2df9dd39db6dc8">  464</a></span>&#160;  <a class="code" href="classhelib_1_1_cube_slice.html#aa8f4111ea23e19590c2df9dd39db6dc8">CubeSlice</a>(<a class="code" href="classhelib_1_1_hyper_cube.html">HyperCube&lt;T&gt;</a>&amp; _cube, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> _dimOffset = 1) :</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;      <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice</a>&lt;T&gt;(_cube, i, _dimOffset)</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;  {}</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160; </div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;  <span class="comment">// deep copy of a slice: copies other into this</span></div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_cube_slice.html#a8b1e963d13911246b0bd32f8542decab">copy</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_const_cube_slice.html">ConstCubeSlice&lt;T&gt;</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160; </div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;  <span class="comment">// reference to element at position i, with bounds check</span></div>
<div class="line"><a name="l00472"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#acdf38cba5dc2eb7fb15adc723f0db83a">  472</a></span>&#160;  T&amp; <a class="code" href="classhelib_1_1_cube_slice.html#acdf38cba5dc2eb7fb15adc723f0db83a">at</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span>T&amp;<span class="keyword">&gt;</span>(this-&gt;<a class="code" href="classhelib_1_1_const_cube_slice.html#a1372bbe035d95cdebc3a24ed85e18556">ConstCubeSlice&lt;T&gt;::at</a>(i)); }</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160; </div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;  <span class="comment">// reference to element at position i, without bounds check</span></div>
<div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="classhelib_1_1_cube_slice.html#a92e4eeedf52b86788cb627eb99adde47">  475</a></span>&#160;  T&amp; <a class="code" href="classhelib_1_1_cube_slice.html#a92e4eeedf52b86788cb627eb99adde47">operator[]</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const</span></div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span>T&amp;<span class="keyword">&gt;</span>(this-&gt;<a class="code" href="classhelib_1_1_const_cube_slice.html#a2df872d7d60ff1e7ec007f7dc02a9339">ConstCubeSlice&lt;T&gt;::operator[]</a>(i));</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;  }</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;};</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160; </div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ab89bc5e58dddac6b2dc64435b98417e1">getHyperColumn</a>(NTL::Vec&lt;T&gt;&amp; v, <span class="keyword">const</span> ConstCubeSlice&lt;T&gt;&amp; s, <span class="keywordtype">long</span> pos);</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160; </div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#aa12cedff32fc67534e469690637bee2d">setHyperColumn</a>(<span class="keyword">const</span> NTL::Vec&lt;T&gt;&amp; v, <span class="keyword">const</span> CubeSlice&lt;T&gt;&amp; s, <span class="keywordtype">long</span> pos);</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160; </div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#aa12cedff32fc67534e469690637bee2d">setHyperColumn</a>(<span class="keyword">const</span> NTL::Vec&lt;T&gt;&amp; v,</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;                    <span class="keyword">const</span> CubeSlice&lt;T&gt;&amp; s,</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;                    <span class="keywordtype">long</span> pos,</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                    <span class="keyword">const</span> T&amp; val);</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160; </div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a5d24bda05c48a744ffffd08de68736ed">print3D</a>(<span class="keyword">const</span> HyperCube&lt;T&gt;&amp; c);</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160; </div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160; </div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_HYPERCUBE_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_afa627edae51d699afbd7ea557e735887"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#afa627edae51d699afbd7ea557e735887">helib::CubeSignature::CubeSignature</a></div><div class="ttdeci">CubeSignature(const long _dims[], long _ndims)</div><div class="ttdef"><b>Definition:</b> hypercube.h:64</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a72e0ba1f4d1afa67023e8d4297ff1aeb"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a72e0ba1f4d1afa67023e8d4297ff1aeb">helib::HyperCube::sliceSize</a></div><div class="ttdeci">long sliceSize(long d=1) const</div><div class="ttdoc">size of one slice</div><div class="ttdef"><b>Definition:</b> hypercube.h:300</div></div>
<div class="ttc" id="anamespacehelib_html_ae8f65ef133cee27ad846423d012d5487"><div class="ttname"><a href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">helib::lsize</a></div><div class="ttdeci">long lsize(const std::vector&lt; T &gt; &amp;v)</div><div class="ttdoc">Size of STL vector as a long (rather than unsigned long)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:652</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a992f756d67769032de90654c201cf1b7"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a992f756d67769032de90654c201cf1b7">helib::HyperCube::addCoord</a></div><div class="ttdeci">long addCoord(long i, long d, long offset) const</div><div class="ttdoc">add offset to coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:291</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a558c114ad092dd3f3ea56f554e1d0c0e"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a558c114ad092dd3f3ea56f554e1d0c0e">helib::HyperCube::at</a></div><div class="ttdeci">T &amp; at(long i)</div><div class="ttdoc">reference to element at position i, with bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:306</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a950ef5b64163f211dd54c7d4489d3aa2"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">helib::CubeSignature::getCoord</a></div><div class="ttdeci">long getCoord(long i, long d) const</div><div class="ttdoc">get coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:104</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a71758a62d2df3a5176a9317045f0d4ff"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a71758a62d2df3a5176a9317045f0d4ff">helib::HyperCube::getCoord</a></div><div class="ttdeci">long getCoord(long i, long d) const</div><div class="ttdoc">get coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:288</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a5141c50fbbb80c5101614f826d1405e3"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a5141c50fbbb80c5101614f826d1405e3">helib::CubeSignature::assembleCoords</a></div><div class="ttdeci">long assembleCoords(VecType &amp;v) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:176</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_ac56487a22f0f9024f5056f64f26f8d0a"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#ac56487a22f0f9024f5056f64f26f8d0a">helib::HyperCube::operator[]</a></div><div class="ttdeci">T &amp; operator[](long i)</div><div class="ttdoc">reference to element at position i, without bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:309</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a2222c9ffaacb4f4eade3f6d5387dbcc1"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a2222c9ffaacb4f4eade3f6d5387dbcc1">helib::ConstCubeSlice::getProd</a></div><div class="ttdeci">long getProd(long from, long to) const</div><div class="ttdoc">product of sizes of dimensions from, from+1, ..., to-1</div><div class="ttdef"><b>Definition:</b> hypercube.h:395</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_afe571f26858da4a0ee94908b20497e8b"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#afe571f26858da4a0ee94908b20497e8b">helib::HyperCube::numCols</a></div><div class="ttdeci">long numCols() const</div><div class="ttdoc">number of columns</div><div class="ttdef"><b>Definition:</b> hypercube.h:303</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a0bde95bd85c1f566e43b0fc5a1ac9df3"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a0bde95bd85c1f566e43b0fc5a1ac9df3">helib::ConstCubeSlice::getSize</a></div><div class="ttdeci">long getSize() const</div><div class="ttdoc">total size</div><div class="ttdef"><b>Definition:</b> hypercube.h:383</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a399e6fd73e187115388692cfd32fb504"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a399e6fd73e187115388692cfd32fb504">helib::ConstCubeSlice::getDim</a></div><div class="ttdeci">long getDim(long d) const</div><div class="ttdoc">size of dimension d</div><div class="ttdef"><b>Definition:</b> hypercube.h:389</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_ab2b8a0cd2c244bc4ba33257ce4bc9819"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#ab2b8a0cd2c244bc4ba33257ce4bc9819">helib::HyperCube::HyperCube</a></div><div class="ttdeci">HyperCube(const HyperCube &amp;other)=default</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_afdf761640cffa14fc956ec9832f2d2c8"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#afdf761640cffa14fc956ec9832f2d2c8">helib::CubeSignature::sliceSize</a></div><div class="ttdeci">long sliceSize(long d=1) const</div><div class="ttdoc">size of one slice</div><div class="ttdef"><b>Definition:</b> hypercube.h:193</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a0f68841b322376a580348abfb7ab0274"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a0f68841b322376a580348abfb7ab0274">helib::HyperCube::getNumDims</a></div><div class="ttdeci">long getNumDims() const</div><div class="ttdoc">number of dimensions</div><div class="ttdef"><b>Definition:</b> hypercube.h:276</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a35bb466664c8bda4f00b46ce2a88135e"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a35bb466664c8bda4f00b46ce2a88135e">helib::CubeSignature::CubeSignature</a></div><div class="ttdeci">CubeSignature()</div><div class="ttdef"><b>Definition:</b> hypercube.h:34</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a9cd93ed835c30921fad60ca7d9850302"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a9cd93ed835c30921fad60ca7d9850302">helib::HyperCube::at</a></div><div class="ttdeci">const T &amp; at(long i) const</div><div class="ttdoc">read-only reference to element at position i, with bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:312</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a381b1ff3cabe3ae637322911a7396c77"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a381b1ff3cabe3ae637322911a7396c77">helib::ConstCubeSlice::getCoord</a></div><div class="ttdeci">long getCoord(long i, long d) const</div><div class="ttdoc">get coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:401</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="anamespacehelib_html_aec77ae5fa0fd11a0a42e07fefe49b99d"><div class="ttname"><a href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">helib::assertEq</a></div><div class="ttdeci">void assertEq(const T &amp;a, const T &amp;b, const std::string &amp;message)</div><div class="ttdef"><b>Definition:</b> assertions.h:108</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a503ba4e37bb66427add82ef13a72ab00"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">helib::CubeSignature::addCoord</a></div><div class="ttdeci">long addCoord(long i, long d, long offset) const</div><div class="ttdoc">add offset to coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:115</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a07dafff8898d869fdf4cda00aea5453a"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a07dafff8898d869fdf4cda00aea5453a">helib::CubeSignature::incrementCoords</a></div><div class="ttdeci">bool incrementCoords(VecType &amp;v) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:138</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a55bd39c9c1967976ddc46feb070c57bf"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a55bd39c9c1967976ddc46feb070c57bf">helib::HyperCube::numSlices</a></div><div class="ttdeci">long numSlices(long d=1) const</div><div class="ttdoc">number of slices</div><div class="ttdef"><b>Definition:</b> hypercube.h:297</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_a8b1e963d13911246b0bd32f8542decab"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#a8b1e963d13911246b0bd32f8542decab">helib::CubeSlice::copy</a></div><div class="ttdeci">void copy(const ConstCubeSlice&lt; T &gt; &amp;other) const</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:152</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a2df872d7d60ff1e7ec007f7dc02a9339"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a2df872d7d60ff1e7ec007f7dc02a9339">helib::ConstCubeSlice::operator[]</a></div><div class="ttdeci">const T &amp; operator[](long i) const</div><div class="ttdoc">read-only reference to element at position i, without bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:440</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a9e2a77ff125ca4e04aadb1ba0b8e947b"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a9e2a77ff125ca4e04aadb1ba0b8e947b">helib::ConstCubeSlice::sliceSize</a></div><div class="ttdeci">long sliceSize(long d=1) const</div><div class="ttdoc">size of one slice</div><div class="ttdef"><b>Definition:</b> hypercube.h:424</div></div>
<div class="ttc" id="anamespacehelib_html_a8e36344202aac3b245f5ba71f69a3e8b"><div class="ttname"><a href="namespacehelib.html#a8e36344202aac3b245f5ba71f69a3e8b">helib::assertInRange</a></div><div class="ttdeci">void assertInRange(const T &amp;elem, const T &amp;min, const T &amp;max, const std::string &amp;message, bool right_inclusive=false)</div><div class="ttdef"><b>Definition:</b> assertions.h:183</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a0fb57f65fb46394e528cf00b5230b0ff"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a0fb57f65fb46394e528cf00b5230b0ff">helib::CubeSignature::CubeSignature</a></div><div class="ttdeci">CubeSignature(const std::vector&lt; long &gt; &amp;_dims)</div><div class="ttdef"><b>Definition:</b> hypercube.h:69</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_acd197efbc091aa3e83876666a7a6e2d1"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#acd197efbc091aa3e83876666a7a6e2d1">helib::HyperCube::operator[]</a></div><div class="ttdeci">const T &amp; operator[](long i) const</div><div class="ttdoc">read-only reference to element at position i, without bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:315</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_aaaf76a8d1f6db9658e14eeecbbe97cdb"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#aaaf76a8d1f6db9658e14eeecbbe97cdb">helib::HyperCube::shift1D</a></div><div class="ttdeci">void shift1D(long i, long k)</div><div class="ttdoc">Shift k positions along the i'th dimension with zero fill.</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:67</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_acd2fddff2c0cdde6cb621f6c4bd75d78"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#acd2fddff2c0cdde6cb621f6c4bd75d78">helib::CubeSignature::getNumDims</a></div><div class="ttdeci">long getNumDims() const</div><div class="ttdoc">number of dimensions</div><div class="ttdef"><b>Definition:</b> hypercube.h:86</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_a92e4eeedf52b86788cb627eb99adde47"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#a92e4eeedf52b86788cb627eb99adde47">helib::CubeSlice::operator[]</a></div><div class="ttdeci">T &amp; operator[](long i) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:475</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a8cddf7a9e157577df80565d50c42f8b5"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a8cddf7a9e157577df80565d50c42f8b5">helib::HyperCube::getProd</a></div><div class="ttdeci">long getProd(long from, long to) const</div><div class="ttdoc">product of sizes of dimensions from, from+1, ..., to-1</div><div class="ttdef"><b>Definition:</b> hypercube.h:285</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a1e0d8be6c51758a86680d3f0f3063606"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">helib::CubeSignature::getDim</a></div><div class="ttdeci">long getDim(long d) const</div><div class="ttdoc">size of dimension d</div><div class="ttdef"><b>Definition:</b> hypercube.h:92</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a94042541a4cc00ed145b38c77a65ebac"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a94042541a4cc00ed145b38c77a65ebac">helib::CubeSignature::assembleIndexByDim</a></div><div class="ttdeci">long assembleIndexByDim(std::pair&lt; long, long &gt; idx, long dim) const</div><div class="ttdoc">The inverse of breakIndexByDim.</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:29</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_aac3aba8f9b2c33bff60c489c048ce0f0"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#aac3aba8f9b2c33bff60c489c048ce0f0">helib::CubeSignature::getAllCoords</a></div><div class="ttdeci">void getAllCoords(VecType &amp;v, long i) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:159</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a957384beeec6fa0c24942cfab5cea98f"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a957384beeec6fa0c24942cfab5cea98f">helib::HyperCube::HyperCube</a></div><div class="ttdeci">HyperCube(const CubeSignature &amp;_sig)</div><div class="ttdoc">initialize a HyperCube with a CubeSignature</div><div class="ttdef"><b>Definition:</b> hypercube.h:233</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a246a8c53d93ec750140cf253e8b41174"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">helib::CubeSignature::getProd</a></div><div class="ttdeci">long getProd(long d) const</div><div class="ttdoc">product of sizes of dimensions d, d+1, ...</div><div class="ttdef"><b>Definition:</b> hypercube.h:95</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a40a482b543e07df30aea4b46529416fd"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a40a482b543e07df30aea4b46529416fd">helib::ConstCubeSlice::numSlices</a></div><div class="ttdeci">long numSlices(long d=1) const</div><div class="ttdoc">number of slices</div><div class="ttdef"><b>Definition:</b> hypercube.h:421</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_afb8bd0492411e47159fa502c2f1d61a8"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#afb8bd0492411e47159fa502c2f1d61a8">helib::HyperCube::rotate1D</a></div><div class="ttdeci">void rotate1D(long i, long k)</div><div class="ttdoc">rotate k positions along the i'th dimension</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:42</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a0057a51c8ea3f2c09aba223a534cee4d"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a0057a51c8ea3f2c09aba223a534cee4d">helib::ConstCubeSlice::getProd</a></div><div class="ttdeci">long getProd(long d) const</div><div class="ttdoc">product of sizes of dimensions d, d+1, ...</div><div class="ttdef"><b>Definition:</b> hypercube.h:392</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_aa7303027f9a2e60756fa1bc1e65e485e"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#aa7303027f9a2e60756fa1bc1e65e485e">helib::CubeSlice::CubeSlice</a></div><div class="ttdeci">CubeSlice(NTL::Vec&lt; T &gt; &amp;_data, const CubeSignature &amp;_sig)</div><div class="ttdef"><b>Definition:</b> hypercube.h:454</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html">helib::ConstCubeSlice</a></div><div class="ttdoc">A constant lower-dimension slice of a hypercube.</div><div class="ttdef"><b>Definition:</b> hypercube.h:338</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_acbe193a9dc0b13828b7446fb1572f6db"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#acbe193a9dc0b13828b7446fb1572f6db">helib::HyperCube::getProd</a></div><div class="ttdeci">long getProd(long d) const</div><div class="ttdoc">product of sizes of dimensions d, d+1, ...</div><div class="ttdef"><b>Definition:</b> hypercube.h:282</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_afdf82fe6ccc0ad79784725212fd9b1c2"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#afdf82fe6ccc0ad79784725212fd9b1c2">helib::ConstCubeSlice::numCols</a></div><div class="ttdeci">long numCols() const</div><div class="ttdoc">number of columns</div><div class="ttdef"><b>Definition:</b> hypercube.h:427</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a62e2bf02d77489e5c5752673413bd4fe"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a62e2bf02d77489e5c5752673413bd4fe">helib::HyperCube::operator==</a></div><div class="ttdeci">bool operator==(const HyperCube&lt; T &gt; &amp;other) const</div><div class="ttdoc">equality testing: signatures must be the same</div><div class="ttdef"><b>Definition:</b> hypercube.h:251</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a703f1b99c86044a134a2c2dd7811c57c"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a703f1b99c86044a134a2c2dd7811c57c">helib::CubeSignature::initSignature</a></div><div class="ttdeci">void initSignature(const long _dims[], long _ndims)</div><div class="ttdef"><b>Definition:</b> hypercube.h:36</div></div>
<div class="ttc" id="anamespacehelib_html_ad61eac49543dd3559b386f94ca7112c9"><div class="ttname"><a href="namespacehelib.html#ad61eac49543dd3559b386f94ca7112c9">helib::resize</a></div><div class="ttdeci">void resize(NTL::Vec&lt; T &gt; &amp;v, long sz, const T &amp;val)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:695</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_ae3b3e6e4fdefec7e372ecbefca124b44"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#ae3b3e6e4fdefec7e372ecbefca124b44">helib::CubeSignature::numSlices</a></div><div class="ttdeci">long numSlices(long d=1) const</div><div class="ttdoc">number of slices</div><div class="ttdef"><b>Definition:</b> hypercube.h:190</div></div>
<div class="ttc" id="anamespacehelib_html_a5d24bda05c48a744ffffd08de68736ed"><div class="ttname"><a href="namespacehelib.html#a5d24bda05c48a744ffffd08de68736ed">helib::print3D</a></div><div class="ttdeci">void print3D(const HyperCube&lt; T &gt; &amp;c)</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:237</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a4eaa2f56a430f7756a880ae022268673"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a4eaa2f56a430f7756a880ae022268673">helib::HyperCube::operator=</a></div><div class="ttdeci">HyperCube &amp; operator=(const HyperCube&lt; T &gt; &amp;other)</div><div class="ttdoc">assignment: signatures must be the same</div><div class="ttdef"><b>Definition:</b> hypercube.h:241</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html"><div class="ttname"><a href="classhelib_1_1_cube_signature.html">helib::CubeSignature</a></div><div class="ttdoc">Holds a vector of dimensions for a hypercube and some additional data.</div><div class="ttdef"><b>Definition:</b> hypercube.h:28</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a4be2eaae3cdf78778fe6455c36912880"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a4be2eaae3cdf78778fe6455c36912880">helib::CubeSignature::CubeSignature</a></div><div class="ttdeci">CubeSignature(const NTL::Vec&lt; long &gt; &amp;_dims)</div><div class="ttdef"><b>Definition:</b> hypercube.h:68</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a03b220d9a0d636d118479cdd05c539c2"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a03b220d9a0d636d118479cdd05c539c2">helib::ConstCubeSlice::getSig</a></div><div class="ttdeci">const CubeSignature &amp; getSig() const</div><div class="ttdoc">const ref to signature</div><div class="ttdef"><b>Definition:</b> hypercube.h:380</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a33363ac14187bd07bcc4d153d5487f76"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a33363ac14187bd07bcc4d153d5487f76">helib::HyperCube::getDim</a></div><div class="ttdeci">long getDim(long d) const</div><div class="ttdoc">size of dimension d</div><div class="ttdef"><b>Definition:</b> hypercube.h:279</div></div>
<div class="ttc" id="anamespacehelib_html_addc58993c7093dd07d98335bab200e82"><div class="ttname"><a href="namespacehelib.html#addc58993c7093dd07d98335bab200e82">helib::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;s, const SKHandle &amp;handle)</div><div class="ttdef"><b>Definition:</b> Ctxt.h:189</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html">helib::HyperCube</a></div><div class="ttdoc">A multi-dimensional cube.</div><div class="ttdef"><b>Definition:</b> hypercube.h:221</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a7384994fa402d0a503419df0f6671e41"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a7384994fa402d0a503419df0f6671e41">helib::HyperCube::getData</a></div><div class="ttdeci">const NTL::Vec&lt; T &gt; &amp; getData() const</div><div class="ttdoc">read-only ref to data vector</div><div class="ttdef"><b>Definition:</b> hypercube.h:270</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a77519f21f1fb6f9ceaaf5143f1dec93b"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">helib::CubeSignature::getSize</a></div><div class="ttdeci">long getSize() const</div><div class="ttdoc">total size of cube</div><div class="ttdef"><b>Definition:</b> hypercube.h:89</div></div>
<div class="ttc" id="anamespacehelib_html_ab89bc5e58dddac6b2dc64435b98417e1"><div class="ttname"><a href="namespacehelib.html#ab89bc5e58dddac6b2dc64435b98417e1">helib::getHyperColumn</a></div><div class="ttdeci">void getHyperColumn(NTL::Vec&lt; T &gt; &amp;v, const ConstCubeSlice&lt; T &gt; &amp;s, long pos)</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:174</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a1372bbe035d95cdebc3a24ed85e18556"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a1372bbe035d95cdebc3a24ed85e18556">helib::ConstCubeSlice::at</a></div><div class="ttdeci">const T &amp; at(long i) const</div><div class="ttdoc">read-only reference to element at position i, with bounds check</div><div class="ttdef"><b>Definition:</b> hypercube.h:430</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a1e7a909ae48826dbf9e73d39e28311ef"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a1e7a909ae48826dbf9e73d39e28311ef">helib::HyperCube::getSize</a></div><div class="ttdeci">long getSize() const</div><div class="ttdoc">total size of cube</div><div class="ttdef"><b>Definition:</b> hypercube.h:273</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a0095f233d39925cf7e6690f9b650bbd5"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a0095f233d39925cf7e6690f9b650bbd5">helib::ConstCubeSlice::ConstCubeSlice</a></div><div class="ttdeci">ConstCubeSlice(const NTL::Vec&lt; T &gt; &amp;_data, const CubeSignature &amp;_sig)</div><div class="ttdef"><b>Definition:</b> hypercube.h:357</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a73fef36c3f0bda715b5e8cdf847227c3"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a73fef36c3f0bda715b5e8cdf847227c3">helib::CubeSignature::operator&lt;&lt;</a></div><div class="ttdeci">friend std::ostream &amp; operator&lt;&lt;(std::ostream &amp;s, const CubeSignature &amp;sig)</div><div class="ttdef"><b>Definition:</b> hypercube.h:208</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_a88bff80a19d958a27a0ca551f3e73313"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#a88bff80a19d958a27a0ca551f3e73313">helib::CubeSlice::CubeSlice</a></div><div class="ttdeci">CubeSlice(HyperCube&lt; T &gt; &amp;_cube)</div><div class="ttdef"><b>Definition:</b> hypercube.h:452</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_acdf38cba5dc2eb7fb15adc723f0db83a"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#acdf38cba5dc2eb7fb15adc723f0db83a">helib::CubeSlice::at</a></div><div class="ttdeci">T &amp; at(long i) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:472</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_aa3a8903128d694618cfbd29efbf78712"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#aa3a8903128d694618cfbd29efbf78712">helib::CubeSignature::initSignature</a></div><div class="ttdeci">void initSignature(const VecType &amp;_dims)</div><div class="ttdef"><b>Definition:</b> hypercube.h:59</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a95fd54e2404c6bb86e0db54d0509530b"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a95fd54e2404c6bb86e0db54d0509530b">helib::CubeSignature::getProd</a></div><div class="ttdeci">long getProd(long from, long to) const</div><div class="ttdoc">product of sizes of dimensions from, from+1, ..., to-1</div><div class="ttdef"><b>Definition:</b> hypercube.h:98</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a52ab718393d2c41b96b000948adc6e0b"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a52ab718393d2c41b96b000948adc6e0b">helib::CubeSignature::breakIndexByDim</a></div><div class="ttdeci">std::pair&lt; long, long &gt; breakIndexByDim(long idx, long dim) const</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:20</div></div>
<div class="ttc" id="anamespacehelib_html_aa12cedff32fc67534e469690637bee2d"><div class="ttname"><a href="namespacehelib.html#aa12cedff32fc67534e469690637bee2d">helib::setHyperColumn</a></div><div class="ttdeci">void setHyperColumn(const NTL::Vec&lt; T &gt; &amp;v, const CubeSlice&lt; T &gt; &amp;s, long pos)</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:193</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html"><div class="ttname"><a href="classhelib_1_1_cube_slice.html">helib::CubeSlice</a></div><div class="ttdoc">A lower-dimension slice of a hypercube.</div><div class="ttdef"><b>Definition:</b> hypercube.h:447</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_a2d30bf545693bf69b1eb151cd968c915"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#a2d30bf545693bf69b1eb151cd968c915">helib::CubeSlice::CubeSlice</a></div><div class="ttdeci">CubeSlice(const CubeSlice&lt; T &gt; &amp;bigger, long i, long _dimOffset=1)</div><div class="ttdef"><b>Definition:</b> hypercube.h:460</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a5791e8467d77d542605a299052a05fc1"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a5791e8467d77d542605a299052a05fc1">helib::ConstCubeSlice::ConstCubeSlice</a></div><div class="ttdeci">ConstCubeSlice(const HyperCube&lt; T &gt; &amp;_cube)</div><div class="ttdoc">initialize the slice to the full cube</div><div class="ttdef"><b>Definition:</b> hypercube.h:349</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_aec3fa326e745e6909d1e2c554bf63747"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#aec3fa326e745e6909d1e2c554bf63747">helib::HyperCube::getData</a></div><div class="ttdeci">NTL::Vec&lt; T &gt; &amp; getData()</div><div class="ttdef"><b>Definition:</b> hypercube.h:267</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_slice_html_aa8f4111ea23e19590c2df9dd39db6dc8"><div class="ttname"><a href="classhelib_1_1_cube_slice.html#aa8f4111ea23e19590c2df9dd39db6dc8">helib::CubeSlice::CubeSlice</a></div><div class="ttdeci">CubeSlice(HyperCube&lt; T &gt; &amp;_cube, long i, long _dimOffset=1)</div><div class="ttdef"><b>Definition:</b> hypercube.h:464</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_a8fd0efeb0727de161843f9f1ea434a73"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#a8fd0efeb0727de161843f9f1ea434a73">helib::ConstCubeSlice::addCoord</a></div><div class="ttdeci">long addCoord(long i, long d, long offset) const</div><div class="ttdoc">add offset to coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:411</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a748f5a34fa6683e46f34602b35046814"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a748f5a34fa6683e46f34602b35046814">helib::HyperCube::operator!=</a></div><div class="ttdeci">bool operator!=(const HyperCube&lt; T &gt; &amp;other) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:259</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a40d654d1f59cf7c85acc69dae9b22e5a"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a40d654d1f59cf7c85acc69dae9b22e5a">helib::CubeSignature::numCols</a></div><div class="ttdeci">long numCols() const</div><div class="ttdoc">number of columns</div><div class="ttdef"><b>Definition:</b> hypercube.h:196</div></div>
<div class="ttc" id="aclasshelib_1_1_hyper_cube_html_a4a1d07c48de62dc384f9059c1dbd0625"><div class="ttname"><a href="classhelib_1_1_hyper_cube.html#a4a1d07c48de62dc384f9059c1dbd0625">helib::HyperCube::getSig</a></div><div class="ttdeci">const CubeSignature &amp; getSig() const</div><div class="ttdoc">const ref to signature</div><div class="ttdef"><b>Definition:</b> hypercube.h:262</div></div>
<div class="ttc" id="aclasshelib_1_1_const_cube_slice_html_aa5b21d8bfc9b9ddb1fffbbc20ebde105"><div class="ttname"><a href="classhelib_1_1_const_cube_slice.html#aa5b21d8bfc9b9ddb1fffbbc20ebde105">helib::ConstCubeSlice::getNumDims</a></div><div class="ttdeci">long getNumDims() const</div><div class="ttdoc">number of dimensions</div><div class="ttdef"><b>Definition:</b> hypercube.h:386</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
